import {request} from '@/until/request'
import {setCookie,getCookie} from '@/until/cookie'
export function getMovies(data){  //获取电影数据列表
  return request({
    url:'/movie/search',
    method:'post',
    data:data
  })
}

export function addMovie(data){  //添加电影
  return request({
    url:'/movie/add',
    method:'post',
    data:data,
    headers: {
      'Authorization': getCookie('token')
    }
  })

}

export function getMoviesDelete(id){ //删除电影
  return request({
    url:'/movie/delete?id='+id,

  })
}

export function moviesChange(data){  //修改电影列表
  return request({
    url:'/movie/update',
    method:'post',
    data:data,
    headers: {
      'Authorization': getCookie('token')
    }
  })
}

